{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a0b30be6-92b5-489e-a5c0-cb5c3ea81226",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3×4的原数组 : [[29 83 52 15]\n",
      " [ 7 64 38 11]\n",
      " [32 40  9 90]]\n",
      "转置后4×3的数组 : [[29  7 32]\n",
      " [83 64 40]\n",
      " [52 38  9]\n",
      " [15 11 90]]\n",
      "变形后2×6的数组 : [[29 83 52 15  7 64]\n",
      " [38 11 32 40  9 90]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "arr = np.random.randint(1,100,size=(3,4))\n",
    "print('3×4的原数组 :',arr)\n",
    "print('转置后4×3的数组 :',arr.T)\n",
    "print('变形后2×6的数组 :',arr.reshape(2,6))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
